Optimal. Leaf size=190 \[ \frac{4 i \sqrt{b} p^2 \text{PolyLog}\left (2,1-\frac{2 \sqrt{a}}{\sqrt{a}+i \sqrt{b} x}\right )}{\sqrt{a}}-\frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+\frac{4 \sqrt{b} p \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt{a}}+\frac{4 i \sqrt{b} p^2 \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )^2}{\sqrt{a}}+\frac{8 \sqrt{b} p^2 \log \left (\frac{2 \sqrt{a}}{\sqrt{a}+i \sqrt{b} x}\right ) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.168799, antiderivative size = 190, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 8, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.444, Rules used = {2457, 205, 2470, 12, 4920, 4854, 2402, 2315} \[ \frac{4 i \sqrt{b} p^2 \text{PolyLog}\left (2,1-\frac{2 \sqrt{a}}{\sqrt{a}+i \sqrt{b} x}\right )}{\sqrt{a}}-\frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+\frac{4 \sqrt{b} p \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt{a}}+\frac{4 i \sqrt{b} p^2 \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )^2}{\sqrt{a}}+\frac{8 \sqrt{b} p^2 \log \left (\frac{2 \sqrt{a}}{\sqrt{a}+i \sqrt{b} x}\right ) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2457
Rule 205
Rule 2470
Rule 12
Rule 4920
Rule 4854
Rule 2402
Rule 2315
Rubi steps
\begin{align*} \int \frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx &=-\frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+(4 b p) \int \frac{\log \left (c \left (a+b x^2\right )^p\right )}{a+b x^2} \, dx\\ &=\frac{4 \sqrt{b} p \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt{a}}-\frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}-\left (8 b^2 p^2\right ) \int \frac{x \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a} \sqrt{b} \left (a+b x^2\right )} \, dx\\ &=\frac{4 \sqrt{b} p \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt{a}}-\frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}-\frac{\left (8 b^{3/2} p^2\right ) \int \frac{x \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a+b x^2} \, dx}{\sqrt{a}}\\ &=\frac{4 i \sqrt{b} p^2 \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )^2}{\sqrt{a}}+\frac{4 \sqrt{b} p \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt{a}}-\frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+\frac{\left (8 b p^2\right ) \int \frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{i-\frac{\sqrt{b} x}{\sqrt{a}}} \, dx}{a}\\ &=\frac{4 i \sqrt{b} p^2 \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )^2}{\sqrt{a}}+\frac{8 \sqrt{b} p^2 \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (\frac{2 \sqrt{a}}{\sqrt{a}+i \sqrt{b} x}\right )}{\sqrt{a}}+\frac{4 \sqrt{b} p \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt{a}}-\frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}-\frac{\left (8 b p^2\right ) \int \frac{\log \left (\frac{2}{1+\frac{i \sqrt{b} x}{\sqrt{a}}}\right )}{1+\frac{b x^2}{a}} \, dx}{a}\\ &=\frac{4 i \sqrt{b} p^2 \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )^2}{\sqrt{a}}+\frac{8 \sqrt{b} p^2 \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (\frac{2 \sqrt{a}}{\sqrt{a}+i \sqrt{b} x}\right )}{\sqrt{a}}+\frac{4 \sqrt{b} p \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt{a}}-\frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+\frac{\left (8 i \sqrt{b} p^2\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1+\frac{i \sqrt{b} x}{\sqrt{a}}}\right )}{\sqrt{a}}\\ &=\frac{4 i \sqrt{b} p^2 \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )^2}{\sqrt{a}}+\frac{8 \sqrt{b} p^2 \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (\frac{2 \sqrt{a}}{\sqrt{a}+i \sqrt{b} x}\right )}{\sqrt{a}}+\frac{4 \sqrt{b} p \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \log \left (c \left (a+b x^2\right )^p\right )}{\sqrt{a}}-\frac{\log ^2\left (c \left (a+b x^2\right )^p\right )}{x}+\frac{4 i \sqrt{b} p^2 \text{Li}_2\left (1-\frac{2 \sqrt{a}}{\sqrt{a}+i \sqrt{b} x}\right )}{\sqrt{a}}\\ \end{align*}
Mathematica [A] time = 0.051766, size = 173, normalized size = 0.91 \[ \frac{4 i \sqrt{b} p^2 x \text{PolyLog}\left (2,\frac{\sqrt{b} x+i \sqrt{a}}{\sqrt{b} x-i \sqrt{a}}\right )-\sqrt{a} \log ^2\left (c \left (a+b x^2\right )^p\right )+4 \sqrt{b} p x \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (\log \left (c \left (a+b x^2\right )^p\right )+2 p \log \left (\frac{2 i}{-\frac{\sqrt{b} x}{\sqrt{a}}+i}\right )\right )+4 i \sqrt{b} p^2 x \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )^2}{\sqrt{a} x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.884, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( \ln \left ( c \left ( b{x}^{2}+a \right ) ^{p} \right ) \right ) ^{2}}{{x}^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\log \left ({\left (b x^{2} + a\right )}^{p} c\right )^{2}}{x^{2}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log{\left (c \left (a + b x^{2}\right )^{p} \right )}^{2}}{x^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left ({\left (b x^{2} + a\right )}^{p} c\right )^{2}}{x^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]